package com.example.tuanduixuanyan;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.ImageView;

public class MainActivity extends AppCompatActivity {


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        final Button b1=findViewById(R.id.button1);
        final Button b2=findViewById(R.id.button1);
        final Button b3=findViewById(R.id.button1);
        b1.setOnClickListener(new View.OnClickListener() {
            int t=0;
            @Override
            public void onClick(View view) {
                t++;
                if (t%3==1){
                    b1.setText("陈琦琦：软件二班，爱打羽毛球！");
                    t++;
                    //05陈琦琦測試
                }
                else if(t%3==2){
                    b1.setText("朱志威：软件一班，爱打篮球和游戏!");
                    t++;
                    //52朱志威测试
                }
                else if(t%3==0){
                    b1.setText("许淯锌：软件二班，爱打篮球和羽毛球!");
                    t++;
                    //45许淯锌測試
                }
            }
        });


    }
}

